Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prototype pretty colors #178

Merged
merged 3 commits into from
Jul 8, 2022
Merged

Prototype pretty colors #178

merged 3 commits into from
Jul 8, 2022

Conversation

nathanleclaire
Copy link
Contributor

@nathanleclaire nathanleclaire commented Jul 7, 2022

Wanted to give a whirl at getting pretty colors from Amman output working, this is pretty cool, although I don't love that dangerouslySetInnerHTML ... def a potential security concern if the app can sign ... so might not be worth it but I wanted to POC it

before:

Screen Shot 2022-07-07 at 3 30 17 PM

after:

Screen Shot 2022-07-07 at 3 27 21 PM

@nathanleclaire
Copy link
Contributor Author

Perhaps we could make our own, scoped down JSX component, since there's a limited amount of stuff we're transforming ... and I do want to add some inner HTML to places where we embed logs -- e.g., make signatures into clickable links to the explorer / workbench txn view automatically ...

@nathanleclaire
Copy link
Contributor Author

https://github.com/cure53/DOMPurify perhaps

@nathanleclaire
Copy link
Contributor Author

added DOMPurify in this PR

coupled with a "don't use hot wallets with a hella bag in workbench cause it's meant to more or less sign everything automatically" might be ok? 🤷‍♂️ I'm equally worried about npm module compromise, long term we'll probably want to mirror our own

@nathanleclaire
Copy link
Contributor Author

this would probably be useful for anchor log fanciness as well ...

Copy link
Member

@SvenDowideit SvenDowideit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO LGTM, send-it!

@nathanleclaire
Copy link
Contributor Author

OK! tests passing!

@nathanleclaire nathanleclaire merged commit 9780bad into main Jul 8, 2022
@nathanleclaire nathanleclaire deleted the ansi_up branch July 8, 2022 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants